package pl.grabar.clinic.core.domain.person.data;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import pl.grabar.clinic.core.domain.enums.PermissionName;

/**
 * Klasa reprazentuje upwawnienia użytkowników systemu
 * 
 * @author db
 * 
 */
@Entity
@Table(name = "PERMISSION")
public class Permission implements Serializable {

	private static final long serialVersionUID = -8180806393334209470L;

	@Id
	@GeneratedValue
	private long id;

	/**
	 * Nazwa uprawnienia wybrana z {@link PermissionName} lub dowolnie
	 * zdefiniowana w systemie
	 */
	@Column
	@Enumerated(EnumType.STRING)
	private PermissionName name;

	/* AKCESORY */
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public PermissionName getName() {
		return name;
	}

	public void setName(PermissionName name) {
		this.name = name;
	}

}
